package template.impl;

import template.ArrayPrint;

import java.util.Arrays;
import java.util.Comparator;

public class PrintStyle2 extends ArrayPrint {
    public PrintStyle2(Integer[] contents) {
        super(contents);
    }

    @Override
    protected void sort() {
        Arrays.sort(contents,(a,b)->b-a);
    }

    @Override
    protected void format() {
        for (Integer content : contents) {
            System.out.print(content+"-");
        }
    }
}
